home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / interinstall / stopnet < prev    next >
Text File  |  1995-08-25  |  738b  |  41 lines

  1. path amitcp:bin sys:rexxc sys:system add
  2. failat 20
  3. set IPHANGUP 0
  4. echo "Stopnet for iNTERiNSTALL 1.51*n"
  5. echo "Taking ppp.device offline."
  6.  
  7. ask "Also shutdown AmiTCP? (y/n): "
  8. set tcpdown $rc
  9.  
  10. ask "Also attempt modem hangup? (y/n): "
  11. if warn
  12.   echo "Trying to hang up... " noline
  13.   run >nil: serline "" $IPMODEMPORT
  14.   set IPHANGUP 1
  15. endif
  16.  
  17. if $tcpdown EQ 5
  18.   run >nil: rx "if show('P','AMITCP')=1 then address AMITCP KILL"
  19.   wait 2
  20. endif
  21.  
  22. offline ppp.device 0
  23.  
  24. if $IPHANGUP EQ 1
  25.   wait 2
  26.   serline "+++" $IPMODEMPORT
  27.   wait 2
  28.   serline "ATH®" $IPMODEMPORT
  29.   wait 5
  30.   serline "!" $IPMODEMPORT
  31.   if $rc EQ 0
  32.     echo "Carrier still present!"
  33.     wait 10
  34.   else
  35.     echo "NO CARRIER"
  36.   endif
  37.   break `status com serline`
  38. endif
  39.  
  40. echo "Done."
  41.